package cn.zwx.common.canal.enums;

/**
 * 业务枚举类
 * @author zhangwenxue
 */
public enum BuisType {

    /**
     * 新增
     */
    INSERT(1,"新增"),
    UPDATE(2,"修改"),
    DELETE(3,"删除");

    private final Integer code;

    private final String msg;

    BuisType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    
    public static String ofValue(Integer code){
        BuisType[] values = BuisType.values();
        for (BuisType value : values) {
            if (value.code.equals(code)){
                return value.msg;
            }
        }
        return "";
    }
}
